package com.bwie.controller;

import com.bwie.utils.R;
import com.bwie.vo.AuthFromVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/auth")
public class AuthController {
    /**
     * 支持路径传参，和json传参
     * @param pageNum
     * @param pageSize
     * @param authFromVo
     * @return
     */
    @PostMapping("/getAuthList/{pageNum}/{pageSize}")
    public R getAuthList(
            @PathVariable("pageNum")Integer pageNum,
            @PathVariable("pageSize")Integer pageSize,
            @RequestBody @Validated AuthFromVo authFromVo
            ){
        log.info("pageNum="+pageNum);
        log.info("pageSize="+pageSize);
        log.info("authFromVo="+authFromVo);
        return R.OK(authFromVo);
    }
}
